package vn.gq.tym.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class CategoryItem implements Parcelable {
	
	private String id, title;
	
	public CategoryItem() {
	}
	
	public CategoryItem(String id, String title) {
		setUrl(id);
		setTitle(title);
	}
	
	public CategoryItem(Parcel source) {
		id = source.readString();
		title = source.readString();
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getUrl() {
		return id;
	}

	public void setUrl(String url) {
		this.id = url;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(title);
	}
	
	public static final Parcelable.Creator<CategoryItem> CREATOR = new Creator<CategoryItem>() {
		
		@Override
		public CategoryItem[] newArray(int size) {
			return new CategoryItem[size];
		}
		
		@Override
		public CategoryItem createFromParcel(Parcel source) {
			return new CategoryItem(source);
		}
	};
	
}
